Repository navigation
fix(web): SSH projects open in a new VS Code window - #41610
Conversation
Repro for #41600: buildRemoteOpenUrl gives vscode-remote folder links no windowId=_blank, so VS Code replaces the last active window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Opening a project in VS Code from an SSH-connected T3 server replaced whatever project was open in the last active VS Code window. Remote folder links for VS Code-family editors (VS Code, Insiders, VSCodium, Cursor) now carry
?windowId=_blank, so the project opens in a new window, as local projects already do since #34480. Links to individual files are unchanged.Fixes #41600
Reproduction on main
Commit a369642 (origin/main). Ran buildRemoteOpenUrl({ editor: 'vscode', host: 'localhost', absolutePath: '/tmp/.../projB' }) from the checkout. It returned vscode://vscode-remote/ssh-remote+localhost/tmp/.../projB, the URL that OpenInPicker hands to openRemoteEditorUrl for SSH environments. I did not click the button in the T3 desktop app; I passed this URL straight to VS Code. Setup: official VS Code 1.147.0 for Linux with Remote-SSH 0.128.0, isolated user-data-dir, headless Xvfb desktop running openbox, settings set to skip workspace trust, the remote-link confirmation prompt and the AI sign-in modal. Steps: (1)
code projA, so one window titled 'projA - Visual Studio Code'. (2)code --open-url <that URL>. Result: wmctrl lists the same window id (0x00400003) now titled 'projB [SSH] - Visual Studio Code', and project A is gone, which is the reported behaviour. The SSH connection itself failed (no key for localhost), but the window had already been replaced. Control: the same steps with?windowId=_blankadded to the URL leave 'projA - Visual Studio Code' open and add a second window, 'projB [SSH] - Visual Studio Code'. Failing test pushed to factory/repro-41600: in apps/web/src/remoteOpen.test.ts it expects a VS Code remote folder URL to carry windowId=_blank; it fails on main and the file's other 22 tests pass.Evidence
Repeated the supplied triage reproduction in official Linux VS Code 1.147.0 with Remote-SSH 0.128.0, isolated profiles, identical synthetic projects, and a 1920x1080 Xvfb/Openbox desktop. Open projA, generate the projB SSH folder URL from each checkout, and pass it directly to
code --open-url. This verifies the direct URL handoff; the T3 button itself was not clicked.On base, the original window ID changed from projA to projB [SSH]. On head, that same window retained projA and a separate window opened projB [SSH]. Both SSH attempts subsequently failed with the same public-key permission error, matching the triage conditions.
Reproduction driver · Supporting evidence and window observations
Not shown:
Tests
vp test run src/remoteOpen.test.ts src/markdown-links.test.ts(apps/web): 32 passed, including the repro testvp test run src/electron/ElectronShell.test.ts(apps/desktop): 9 passedvp run check:changed: lint, knip, typecheck (39 packages) and tests all passedNot in this change
:1:1) still carry no window hint, as on the local path, where only folders get --new-window.Who did the work
Run by the t3code factory in T3 Code.